package com.lingkang.flychat.http.service;


import com.lingkang.flychat.config.UrlConfig;
import com.lingkang.flychat.entity.FriendList;
import com.lingkang.flychat.dto.ResponseResult;
import com.lingkang.flychat.entity.User;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;

public interface UserService {

    @FormUrlEncoded
    @POST(UrlConfig.login)
    Observable<ResponseResult> login(@Field("username") String username,
                                     @Field("password") String password);

    @GET(UrlConfig.info)
    Observable<ResponseResult<User>> info();

    @GET(UrlConfig.friendList)
    Observable<ResponseResult<List<FriendList>>> friendList();


}
